package com.xzx.study.animation;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import com.xzx.study.R;

public class Setup3Activity extends AppCompatActivity implements View.OnClickListener {

    private Button setup3_previous;
    private Button setup3_next;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setup3);

        setup3_previous = findViewById(R.id.setup3_previous);
        setup3_previous.setOnClickListener(this);

        setup3_next = findViewById(R.id.setup3_next);
        setup3_next.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v == setup3_previous) {
            finish();
            overridePendingTransition(R.anim.left_in, R.anim.right_out);
        } else if (v == setup3_next) {
            startActivity(new Intent(this, SetupCompleteActivity.class));
            finish();
            overridePendingTransition(R.anim.bottom_in, R.anim.fade_out);
        }
    }
}
